package Demo;

public class Demo01_Thread {
    public static void main(String[] args) {
        //初始化自定义的线程
        MyThread01 myThread01 = new MyThread01();
        //运行这个线程
        myThread01.start();
    }
}

//自定义一个线程类，继承JDK中的Thread
class MyThread01 extends Thread{
    //定义线程的rw
    public void run(){
        //可以不停的处理任务
        while (true){
            System.out.println("hello my thread...");
        }
    }
}